-- =============================================
-- Author:		Thijssen, Rob
-- Create date: 2007-05-08
-- Description:	Retrieve Resources
-- =============================================

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[GetResources]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
	DROP PROCEDURE GetResources
END
GO
CREATE PROCEDURE GetResources
	@ResourceObject nvarchar(255) = null,
	@CultureName nvarchar(50) = null
AS
BEGIN
	SET NOCOUNT ON;
	
	IF (@ResourceObject IS NOT NULL AND @CultureName IS NOT NULL) BEGIN
	
		SELECT
			ResourceName,
			ResourceValue
		FROM CultureResource
		WHERE ResourceObject = @ResourceObject
		AND CultureName = @CultureName 

	END
	
END
GO
GRANT EXECUTE ON GetResources TO [AspNetResources]
GO